// creat expression tree by matching brackets
// expression is like op (non-parentheses content) op ()
// eg: -x*y+(3*x-(x+y)*z)-(x^2-z)*x
//     -x*y*(3*x-(x+y)*z)*((x^2-z)-x)
// resulting a try

struct  __node;
typedef struct __node node;

struct __node_link_list {
	node* ptr;
	struct __node_link_list* next;
};

struct  __node {
		char* ptr_beg, ptr_end; // begin and end point of the substring related to the node
		struct __node_link_list subtrees; //  pointers to node of subtrees
		struct __node* ptr_sup; //  pointers to the parent node
		int n_childs; // number of subtrees
		int type; // indicating how the pre-operation type of the node 
};

typedef struct __node node;

typedef struct tree_expr{
	node root;
	char* expr;
};


// function to build a expression tree from a expression string
tree_expr build_exprtree(char* expr){

}
